money = 10000
i = 0

while money < 20000:
    i += 1
    print(f"第{i}年的本金{money} 利息{money * 0.05}")
    money *= 1.05

print(f"需要{i}年才能变成20000块钱")
